<include file="public@header" />
</head>
<body>
	<div class="wrap">
		<ul class="nav nav-tabs">
			<li class="active"><a>公会列表</a></li>
		</ul>
		<form class="well form-inline margin-top-20" method="post" action="{:url('Family/index')}">
            审核状态： 
            <select class="form-control" name="state">
				<option value="">全部</option>
                <volist name="state" id="v">
                    <option value="{$key}" <if condition="input('request.state') neq '' && input('request.state') eq $key">selected</if>>{$v}</option>
                </volist>
			</select>
			提交时间：
			<input class="form-control js-bootstrap-date" name="start_time" id="start_time" autocomplete="off" value="{:input('request.start_time')}" aria-invalid="false" style="width: 110px;"> - 
            <input class="form-control js-bootstrap-date" name="end_time" id="end_time" autocomplete="off" value="{:input('request.end_time')}" aria-invalid="false" style="width: 110px;">
            用户ID：
            <input class="form-control" type="text" name="uid" style="width: 200px;" value="{:input('request.uid')}"
                   placeholder="请输入用户ID">
			关键字： 
            <input class="form-control" type="text" name="keyword" style="width: 200px;" value="{:input('request.keyword')}"
                   placeholder="请输入公会名称">
			<input type="submit" class="btn btn-primary" value="搜索">
		</form>				
		<form method="post" class="js-ajax-form" >
			<table class="table table-hover table-bordered">
				<thead>
					<tr>
						<th>ID</th>
						<th>公会名字</th>						
						<th>公会长（ID）</th>
						<th>公会徽章图标</th>
						<th>公会简介</th>
						<th>公会抽成（%）</th>
						<th>状态</th>
						<th>提交时间</th>
						<th>{:lang('ACTIONS')}</th>
					</tr>
				</thead>
				<tbody>
					<foreach name="lists" item="vo">
					<tr>
						<td>{$vo.id}</td>
						<td>{$vo['name']}</td>	
						<td>{$vo['userinfo']['user_nickname']}({$vo['uid']})</td>
						<td><img src="{$vo['badge']}" class="imgtip" style="height:20px"></td>
						<td style="max-width: 200px;word-break:break-all;">{$vo['briefing']}</td>
						<td>{$vo['divide_family']}</td>
						<td>{$state[$vo['state']]}</td>
						<td>{:date('Y-m-d H:i:s',$vo['addtime'])}</td>						
						<td align="center">
                            <if condition="$vo['disable'] eq '0'">
                                <a class="btn btn-xs btn-danger js-ajax-dialog-btn" href="{:url('Family/disable',array('id'=>$vo['id']))}" >禁用</a>
                            <else/>
                                <a class="btn btn-xs btn-danger js-ajax-dialog-btn" href="{:url('Family/enable',array('id'=>$vo['id']))}" >启用</a>
                            </if>
                                
                            <a class="btn btn-xs btn-primary" href='{:url("Family/profit",array("uid"=>$vo["uid"]))}'>收益</a>
                            <a class="btn btn-xs btn-primary" href='{:url("Family/cash",array("uid"=>$vo["uid"]))}'>提现记录</a>
                            <a class="btn btn-xs btn-primary" href='{:url("Family/edit",array("id"=>$vo["id"]))}'>{:lang('EDIT')}</a>
							<a class="btn btn-xs btn-danger js-ajax-delete" href="{:url('Family/del',array('id'=>$vo['id']))}" data-msg="强制删除会将该公会下的成员信息一并删除！">{:lang('DELETE')}</a>
						</td>
					</tr>
					</foreach>
				</tbody>
			</table>
			<div class="pagination">{$page}</div>

		</form>
	</div>
	<script src="__STATIC__/js/admin.js"></script>
</body>
</html>